package com.framewiki.example.entity;

import java.time.LocalDateTime;

import org.checkerframework.checker.units.qual.C;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import lombok.Data;

@Data
@Entity
@Table(name = "rms_oauth2_tokens")
public class RmsOauth2TokensEntity {

  /**
   * 主键ID
   */
  @Id
  @Column(name = "id", unique = true)
  private String id;

  /**
   * 客户端ID
   */
  @Column(name = "client_id")
  private String clientId;
  /**
   * 用户ID
   */
  @Column(name = "user_id")
  private String userId;
  /**
   * 访问令牌
   */
  @Column(name = "access_token", columnDefinition = "text")
  private String accessToken;
  /**
   * 刷新令牌
   */
  @Column(name = "refresh_token", columnDefinition = "text")
  private String refreshToken;
  /**
   * 颁发时间
   */
  @Column(name = "issued_at")
  private LocalDateTime issuedAt;
  /**
   * 过期时间
   */
  @Column(name = "expiration")
  private LocalDateTime expiration;
}
